#include "Bird.h"
#include "util.h"
#include "SoundMgr.h"
#include "Level.h"
#include "TimeMgr.h"
#include "Config.h"


void Bird::destroy()
{
	//only the bird
	//ASSERT(Level::getInstance()->birds.front()==this);
	//SoundMgr::getInstance()
	birdState=DEAD;
	SoundMgr::getInstance()->play("bird 05 collision a5.wav");
}

void Bird::getReady()
{
	SoundMgr::getInstance()->play("bird next military a1.wav");
}

void Bird::fly()
{
	SoundMgr::getInstance()->play("bird 04 flying.wav");
}

void Bird::collide()
{
	SoundMgr::getInstance()->play("bird 04 flying.wav");
	TimeMgr::getInstance()->addListener(this,5);
}

void Bird::timeUp()
{
	destroy();
}

Bird::Bird( void ) :isOut(false),birdState(WAITING)
{
}
